<template>
    <div>
        <p>输入的账号是 {{ ValAccount }}</p>
        <p>输入的密码是 {{ ValPassword }}</p>
        <button @click="checkAccAndPsw">点击检查</button>
    </div>
</template>

<script>
export default {
    props:{
        ValAccount:'',
        ValPassword:''
    },
    emits:['check'],
    methods:{
        checkAccAndPsw() {
            
            if(this.ValAccount === 'abc' && this.ValPassword === '123') {
                this.$emit('check', true)
            } else {
                this.$emit('check', false)
            }
        }
    }
}

</script>